import java.util.Arrays;
import java.util.List;

/**
 * @author understand
 * @description:
 * @create 2025/5/23 17:15
 */
public class StreamTest {
    public static void main(String[] args) {
        //1.并行（parallel）程序
        List<String> strings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl");
        System.out.println(strings.stream().filter(item->item.isEmpty()).count());
        System.out.println(strings.parallelStream().filter(String::isEmpty).count());

    }
}
